
program chapter5_16
    implicit none
    integer i, j, mul, sumup
    print *, 'sum up the value of n! , n in range 1-10'
    i=1
    j=1
    mul=1
    sumup=0
    do 10, while(i .LT. 11)
        !sumup=sumup+mul
        i=i+1
        do 20, while(j .LT. i+1)
            mul=mul*j
            j=j+1
            print *, 'mul=', mul
        20 continue
        sumup=sumup+mul
        print *, 'sumup=', sumup
    10 continue
    print *, 'sumup finally=', sumup

end program

